<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC Generator (erpcgen): Interface.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC Generator (erpcgen)
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_interface_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Interface.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2016 NXP</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef _EMBEDDED_RPC__INTERFACE_H_</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define _EMBEDDED_RPC__INTERFACE_H_</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;Function.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;Symbol.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;SymbolScope.h&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// Classes</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceerpcgen.html">erpcgen</a> {</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html">   28</a></span>&#160;<span class="keyword">class </span><a class="code" href="classerpcgen_1_1_interface.html">Interface</a> : <span class="keyword">public</span> <a class="code" href="classerpcgen_1_1_symbol.html">Symbol</a></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a16f113a54ffefef5bb88a80dee4f824e">   31</a></span>&#160;    <span class="keyword">typedef</span> std::vector&lt;Function *&gt; <a class="code" href="classerpcgen_1_1_interface.html#a16f113a54ffefef5bb88a80dee4f824e">function_vector_t</a>; </div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a5a582889a8b33b56b2bc95ca50553e82">   40</a></span>&#160;    <a class="code" href="classerpcgen_1_1_interface.html#a5a582889a8b33b56b2bc95ca50553e82">Interface</a>(<span class="keyword">const</span> <a class="code" href="classerpcgen_1_1_token.html">Token</a> &amp;tok)</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    : <a class="code" href="classerpcgen_1_1_symbol.html">Symbol</a>(kInterfaceSymbol, tok)</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    , <a class="code" href="classerpcgen_1_1_interface.html#a0e724fcee9047ffd6e8489ec11b37633">m_scope</a>()</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    , <a class="code" href="classerpcgen_1_1_interface.html#a9824f20d0c8f6f2fdb31e2e763b2db7d">m_uniqueId</a>(<a class="code" href="classerpcgen_1_1_interface.html#a5065701ce7e3ea17ea03d7dae2d5cf97">s_idCounter</a>++)</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classerpcgen_1_1_interface.html#ac40ec70b9076e7a824c10e4ef9219722">addFunction</a>(<a class="code" href="classerpcgen_1_1_function.html">Function</a> *func);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a332008916b0644e8e7d90abdfd3dcae6">   62</a></span>&#160;    <a class="code" href="classerpcgen_1_1_symbol_scope.html">SymbolScope</a> &amp;<a class="code" href="classerpcgen_1_1_interface.html#a332008916b0644e8e7d90abdfd3dcae6">getScope</a>() { <span class="keywordflow">return</span> <a class="code" href="classerpcgen_1_1_interface.html#a0e724fcee9047ffd6e8489ec11b37633">m_scope</a>; }</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a08a3aa3a3ef86cc8be10a85ececa37e0">   69</a></span>&#160;    function_vector_t &amp;<a class="code" href="classerpcgen_1_1_interface.html#a08a3aa3a3ef86cc8be10a85ececa37e0">getFunctions</a>() { <span class="keywordflow">return</span> <a class="code" href="classerpcgen_1_1_interface.html#abda1f3c752ee0e7b479d6a8979252063">m_functions</a>; }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#ac0ca719823770af363b680af4ef1db74">   76</a></span>&#160;    uint32_t <a class="code" href="classerpcgen_1_1_interface.html#ac0ca719823770af363b680af4ef1db74">getUniqueId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classerpcgen_1_1_interface.html#a9824f20d0c8f6f2fdb31e2e763b2db7d">m_uniqueId</a>; }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a5a055f7e6ac3298cf763ee5e67a9e39d">   83</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classerpcgen_1_1_interface.html#a5a055f7e6ac3298cf763ee5e67a9e39d">setUniqueId</a>(uint32_t newId) { <a class="code" href="classerpcgen_1_1_interface.html#a9824f20d0c8f6f2fdb31e2e763b2db7d">m_uniqueId</a> = newId; }</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keyword">virtual</span> std::string <a class="code" href="classerpcgen_1_1_interface.html#ad799dd9e9c759102652c69086467f73b">getDescription</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a0e724fcee9047ffd6e8489ec11b37633">  103</a></span>&#160;    <a class="code" href="classerpcgen_1_1_symbol_scope.html">SymbolScope</a> <a class="code" href="classerpcgen_1_1_interface.html#a0e724fcee9047ffd6e8489ec11b37633">m_scope</a>;           </div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#abda1f3c752ee0e7b479d6a8979252063">  104</a></span>&#160;    function_vector_t <a class="code" href="classerpcgen_1_1_interface.html#abda1f3c752ee0e7b479d6a8979252063">m_functions</a>; </div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a9824f20d0c8f6f2fdb31e2e763b2db7d">  105</a></span>&#160;    uint32_t <a class="code" href="classerpcgen_1_1_interface.html#a9824f20d0c8f6f2fdb31e2e763b2db7d">m_uniqueId</a>;           </div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_interface.html#a5065701ce7e3ea17ea03d7dae2d5cf97">  107</a></span>&#160;    <span class="keyword">static</span> uint32_t <a class="code" href="classerpcgen_1_1_interface.html#a5065701ce7e3ea17ea03d7dae2d5cf97">s_idCounter</a>; </div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;};</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;} <span class="comment">// namespace erpcgen</span></div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor">#endif // _EMBEDDED_RPC__INTERFACE_H_</span></div><div class="ttc" id="classerpcgen_1_1_interface_html_abda1f3c752ee0e7b479d6a8979252063"><div class="ttname"><a href="classerpcgen_1_1_interface.html#abda1f3c752ee0e7b479d6a8979252063">erpcgen::Interface::m_functions</a></div><div class="ttdeci">function_vector_t m_functions</div><div class="ttdef"><b>Definition:</b> Interface.h:104</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_ac40ec70b9076e7a824c10e4ef9219722"><div class="ttname"><a href="classerpcgen_1_1_interface.html#ac40ec70b9076e7a824c10e4ef9219722">erpcgen::Interface::addFunction</a></div><div class="ttdeci">void addFunction(Function *func)</div><div class="ttdoc">This function will add function to the interface. </div><div class="ttdef"><b>Definition:</b> Type.cpp:509</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a5a055f7e6ac3298cf763ee5e67a9e39d"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a5a055f7e6ac3298cf763ee5e67a9e39d">erpcgen::Interface::setUniqueId</a></div><div class="ttdeci">void setUniqueId(uint32_t newId)</div><div class="ttdoc">This function set unique id for interface. </div><div class="ttdef"><b>Definition:</b> Interface.h:83</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a332008916b0644e8e7d90abdfd3dcae6"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a332008916b0644e8e7d90abdfd3dcae6">erpcgen::Interface::getScope</a></div><div class="ttdeci">SymbolScope &amp; getScope()</div><div class="ttdoc">This function return symbol scope. </div><div class="ttdef"><b>Definition:</b> Interface.h:62</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a08a3aa3a3ef86cc8be10a85ececa37e0"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a08a3aa3a3ef86cc8be10a85ececa37e0">erpcgen::Interface::getFunctions</a></div><div class="ttdeci">function_vector_t &amp; getFunctions()</div><div class="ttdoc">This function return interface functions vector. </div><div class="ttdef"><b>Definition:</b> Interface.h:69</div></div>
<div class="ttc" id="classerpcgen_1_1_function_html"><div class="ttname"><a href="classerpcgen_1_1_function.html">erpcgen::Function</a></div><div class="ttdoc">Function declaration. </div><div class="ttdef"><b>Definition:</b> Function.h:116</div></div>
<div class="ttc" id="classerpcgen_1_1_symbol_html"><div class="ttname"><a href="classerpcgen_1_1_symbol.html">erpcgen::Symbol</a></div><div class="ttdoc">Base class for all named declarations in the IDL. </div><div class="ttdef"><b>Definition:</b> Symbol.h:27</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a9824f20d0c8f6f2fdb31e2e763b2db7d"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a9824f20d0c8f6f2fdb31e2e763b2db7d">erpcgen::Interface::m_uniqueId</a></div><div class="ttdeci">uint32_t m_uniqueId</div><div class="ttdef"><b>Definition:</b> Interface.h:105</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a5a582889a8b33b56b2bc95ca50553e82"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a5a582889a8b33b56b2bc95ca50553e82">erpcgen::Interface::Interface</a></div><div class="ttdeci">Interface(const Token &amp;tok)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> Interface.h:40</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a16f113a54ffefef5bb88a80dee4f824e"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a16f113a54ffefef5bb88a80dee4f824e">erpcgen::Interface::function_vector_t</a></div><div class="ttdeci">std::vector&lt; Function * &gt; function_vector_t</div><div class="ttdef"><b>Definition:</b> Interface.h:31</div></div>
<div class="ttc" id="classerpcgen_1_1_symbol_scope_html"><div class="ttname"><a href="classerpcgen_1_1_symbol_scope.html">erpcgen::SymbolScope</a></div><div class="ttdoc">A scoped namespace containing symbols. </div><div class="ttdef"><b>Definition:</b> SymbolScope.h:27</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a0e724fcee9047ffd6e8489ec11b37633"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a0e724fcee9047ffd6e8489ec11b37633">erpcgen::Interface::m_scope</a></div><div class="ttdeci">SymbolScope m_scope</div><div class="ttdef"><b>Definition:</b> Interface.h:103</div></div>
<div class="ttc" id="classerpcgen_1_1_token_html"><div class="ttname"><a href="classerpcgen_1_1_token.html">erpcgen::Token</a></div><div class="ttdoc">Encapsulates all information about a token. </div><div class="ttdef"><b>Definition:</b> Token.h:60</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_ac0ca719823770af363b680af4ef1db74"><div class="ttname"><a href="classerpcgen_1_1_interface.html#ac0ca719823770af363b680af4ef1db74">erpcgen::Interface::getUniqueId</a></div><div class="ttdeci">uint32_t getUniqueId() const </div><div class="ttdoc">This function get unique id of interface. </div><div class="ttdef"><b>Definition:</b> Interface.h:76</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_ad799dd9e9c759102652c69086467f73b"><div class="ttname"><a href="classerpcgen_1_1_interface.html#ad799dd9e9c759102652c69086467f73b">erpcgen::Interface::getDescription</a></div><div class="ttdeci">virtual std::string getDescription() const </div><div class="ttdoc">This function returns description about the interface. </div><div class="ttdef"><b>Definition:</b> Type.cpp:517</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html"><div class="ttname"><a href="classerpcgen_1_1_interface.html">erpcgen::Interface</a></div><div class="ttdoc">An interface that contains functions. </div><div class="ttdef"><b>Definition:</b> Interface.h:28</div></div>
<div class="ttc" id="classerpcgen_1_1_interface_html_a5065701ce7e3ea17ea03d7dae2d5cf97"><div class="ttname"><a href="classerpcgen_1_1_interface.html#a5065701ce7e3ea17ea03d7dae2d5cf97">erpcgen::Interface::s_idCounter</a></div><div class="ttdeci">static uint32_t s_idCounter</div><div class="ttdef"><b>Definition:</b> Interface.h:107</div></div>
<div class="ttc" id="namespaceerpcgen_html"><div class="ttname"><a href="namespaceerpcgen.html">erpcgen</a></div><div class="ttdef"><b>Definition:</b> AstNode.h:25</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
